<?php


namespace App\Utils;


use Hyperf\Logger\LoggerFactory;
use Psr\Log\LoggerInterface;

/**
 * Class LoggerInterface
 * @package App\Utils
 */
class Log
{
    use ShareContext;

    /**
     * @param null|string|int $requestID
     * @return mixed|LoggerInterface
     */
    public static function get($requestID = null)
    {
        self::requestID();
        $requestID = $requestID ?? Common::getRequestID();
        return di(LoggerFactory::class)->get((string)$requestID);
    }
}